// import { getToken } from "@/utils/auth";
// import axios from "axios";
// export const reqLogin = (data: { userName: string; password: string }) =>
//   axios.post("http://shop.lanlianhua.work/api/v1/auth/manager_login", data);

// export const getUserInfo = () =>
//   axios.get("http://shop.lanlianhua.work/api/v1/users/manager_info", {
//     headers: {
//       authorization: `Bearer ${localStorage.getItem("token")}`
//     }
//   });
import { post, get } from "@/utils/request";

export type UserResult = {};
export type LoginData = {
  userName: string;
  pwd: string;
  type?: number;
};
export const reqLogin = (data: LoginData) =>
  post("/api/v1/auth/admin_login", data);

export const getUserInfo = () => get("/api/v1/admin/managers/info", {});

// 获取用户列表
export const reqUsers = () => get("/api/v1/admin/managers", {});
